<?php
require '../conn.php';
require 'config.php';
require '../inc/function.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="../css/admin.css" type="text/css" />
<script type="text/javascript" src="inc/function.js"></script>
<script type="text/javascript" src="../fy_ckeditor/ckeditor.js"></script>
</head>
<body>
<?php
if ($act=='modify'){
	$e_order=ReStra($_POST['e_order']);
	$e_name=ReStra(trim($_POST['e_name']));
	$e_image=ReStra($_POST['e_image']);
	$e_desc=ReStra($_POST['e_desc']);
	$e_content=ReStra($_POST['e_content']);
	$k_name=ReStra($_POST['k_name']);
	$k_keyword=ReStra($_POST['k_keyword']);
	$k_description=ReStra($_POST['k_description']);
	$image_original=RsField('select e_image from '.$language.'_exhpy where e_id='.$id);
	if ($e_image!=$image_original) DeleteFile('../'.$image_original);
	$sql="update ".$language."_exhpy set 
	e_order=$e_order,
	e_name='$e_name',
	e_image='$e_image',
	e_desc='$e_desc',
	e_content='$e_content',
	k_name='$k_name',
	k_keyword='$k_keyword',
	k_description='$k_description'
	 where e_id=$id";
	mysql_query($sql) or die(mysql_error($sql));
	Msg('','exhpy.php?'.$urls);
}

$class_name=RsField('select e_name from '.$language.'_exhibition_class where e_id='.$meter);
$query=mysql_query('select * from '.$language.'_exhpy where e_id='.$id,$conn);
$row=mysql_fetch_array($query);
?>
<div id="container">
  <div class="edit">
      <h1>展商及买家评语 - <?php echo $class_name ?><a href="javascript:location.reload();">刷新</a></h1>
      <form name="form1" method="post" action="?act=modify&<?php echo $urls.'&id='.$id ?>" onsubmit="return Checkexhpy(this);">
        <table id="protbe" width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td class="edit_title">展会名称：</td>
            <td><input type="text" name="e_name" class="inputtext" value="<?php echo $row['e_name'] ?>" size="80" maxlength="200" /></td>
          </tr>
          <tr>
            <td class="edit_title">展会图片：</td>
            <td><input type="text" name="e_image" id="e_image" class="inputtext" value="<?php echo $row['e_image'] ?>" size="50" readonly="readonly" />&nbsp;(图片尺寸：200*100)<iframe src="../upload_fy.php?file_type=0&file_id=e_image" frameborder="0" allowtransparency="true" scrolling="no" width="100%" height="25"></iframe></td>
          </tr>
          <tr>
            <td class="edit_title">展会简介：</td>
            <td><textarea name="e_desc" class="inputarea"><?php echo $row['e_desc'] ?></textarea></td>
		  </tr>
          <tr>
            <td class="edit_title">展会排序：</td>
            <td><input type="text" name="e_order" id="e_order" class="inputtext" value="<?php echo $row['e_order'] ?>" size="10" maxlength="10" /></td>
          </tr>
          <tr>
            <td class="edit_title">Title：</td>
            <td><input type="text" name="k_name" class="inputtext" value="<?php echo $row['k_name'] ?>" style="width:98%" maxlength="255" /></td>
          </tr>
          <tr>
            <td class="edit_title">Keyword：</td>
            <td><input type="text" name="k_keyword" class="inputtext" value="<?php echo $row['k_keyword'] ?>" style="width:98%" maxlength="255" /></td>
          </tr>
          <tr>
            <td class="edit_title">Description：</td>
            <td><input type="text" name="k_description" class="inputtext" value="<?php echo $row['k_description'] ?>" style="width:98%" maxlength="255" /></td>
          </tr>
          <tr>
            <td class="edit_title">详细介绍：</td>
            <td><div class="edit_contents"><textarea name="e_content" class="ckeditor"><?php echo $row['e_content'] ?></textarea></div></td>
		  </tr>
          <tr>
            <td class="edit_title" height="30">&nbsp;</td>
			<td><input type="submit" name="button" class="button" value=" 保存 " />&nbsp;&nbsp;<input type="button" name="button" class="button" value=" 返回 " onclick="location.href='exhpy.php?<?php echo $urls ?>'" /></td>
          </tr>
        </table>
    </form>
    </div>
</div>
</body>
</html>